Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sos_extras] Allow obfuscation in sos_extras configs #3768

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pmoravec
Copy link
Contributor

@pmoravec pmoravec commented Sep 1, 2024

Resolves: #3768


Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines

  • Is the commit message split over multiple lines and hard-wrapped at 72 characters?
  • Is the subject and message clear and concise?
  • Does the subject start with [plugin_name] if submitting a plugin patch or a [section_name] if part of the core sosreport code?
  • Does the commit contain a Signed-off-by: First Lastname [email protected]?
  • Are any related Issues or existing PRs properly referenced via a Closes (Issue) or Resolved (PR) line?
  • Are all passwords or private data gathered by this PR obfuscated?

Copy link

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/sosreport-sos-3768
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

@pmoravec
Copy link
Contributor Author

pmoravec commented Sep 1, 2024

Limitations:

  • different globs for files/cmds to collect (/path/to/file.log*) and to obfuscate in (/path/to/file.log.*) - this is user unfriendly
  • no way to express space in either RE (to search or to replace)
  • example line *:/path/to/files(.*) pass:\\s*(.*) \1******** should have \s instead of \\s but that would raise W605 invalid escape sequence '\s' :(

Worth to discuss:

  • particular syntax

@pmoravec pmoravec force-pushed the sos-pmoravec-sos-extras-allow-obfuscation branch from ccb340b to 3056602 Compare September 3, 2024 06:39
@TurboTurtle
Copy link
Member

I'm torn on this.

On the one hand, it is useful functionality and I can see the practicality. On the other, we don't really want to encourage using sos_extras as an alternative to plugin development. It's chiefly meant to serve as a function of "I need this right away while a plugin is being updated or developed which is either currently happening or I am about to open a request for".

@pmoravec
Copy link
Contributor Author

The request comes from a customer having some logs written to an unusual customized location that sos will never collect. But the logfile is important for troubleshooting. Like, e.g. /var/log/httpd/access_log is moved to /var/log/httpd/my_custom_access_log.

The httpd access log is just ilustrative example. I will check if we can't (or even shouldn't) parse some config file that specifies such custom logfiles, and collect the custom logfiles automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants